# -*- coding: utf-8 -*-
"""
------------------------------------------------------------------------------
    File Name:  exception
    Author   :  wanwei1029
    Date     :  2018/10/20
    Desc     :
------------------------------------------------------------------------------
"""
import samp.samp_logging as sl
import traceback


logger = sl.get_logger("exception")


def fun1():
    return 1/0


def fun2():
    return fun1()


def fun3():
    return fun2()


def demo():
    """
    """
    try:
        fun3()
    except Exception as e:
        # logger.info(str(e))
        # logger.info(repr(e))
        logger.error(traceback.format_exc())


if __name__ == '__main__':
    test_method = "demo"
    if test_method == "demo":
        demo()
